package controller.listeners.manualCode;



import model.ManualCodeModel;

import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

import view.ManualCodeView;

public class CacheCodeCorpsCheckedSelectionListener implements Listener {


	private ManualCodeView _view;
	private ManualCodeModel _model;
	
			public CacheCodeCorpsCheckedSelectionListener(ManualCodeView view,
					ManualCodeModel model) {
				this._model = model;
				this._view = view;
			}
			
			@Override
			public void handleEvent(Event event) {
				_model.set_custom_corp(_view.getSelected_cache_code_corp());
				
				_view.setCorpCustomText(_model.get_custom_corp());
				_view.setCandidateCenters(_model.get_candidate_centers_custom(), _model.get_custom_corp());
				_view.setFocusOnCustomCorp();
			}
		}